load("//:java_grpc_library.bzl", "java_grpc_library")

java_library(
    name = "grpclb",
    srcs = glob([
        "src/main/java/io/grpc/grpclb/*.java",
    ]),
    visibility = ["//visibility:public"],
    deps = [
        ":load_balancer_java_grpc",
        ":load_balancer_java_proto",
        "//core",
        "//core:internal",
        "//core:util",
        "//stub",
        "@com_google_code_findbugs_jsr305//jar",
        "@com_google_guava_guava//jar",
        "@com_google_j2objc_j2objc_annotations//jar",
        "@com_google_protobuf//:protobuf_java_util",
    ],
)

proto_library(
    name = "load_balancer_proto",
    srcs = ["src/main/proto/grpc/lb/v1/load_balancer.proto"],
    deps = [
        "@com_google_protobuf//:duration_proto",
        "@com_google_protobuf//:timestamp_proto",
    ],
)

java_proto_library(
    name = "load_balancer_java_proto",
    deps = [":load_balancer_proto"],
)

java_grpc_library(
    name = "load_balancer_java_grpc",
    srcs = [":load_balancer_proto"],
    deps = [":load_balancer_java_proto"],
)
